using System;
using System.Collections.Generic;
using System.Text;
using ORMapping;
using NHibernate;

namespace DAL
{
    public class ReceiptPrintHistoryDAL
    {
        private EntityControl<ReceiptPrintHistory> control;

        public ReceiptPrintHistoryDAL()
        {
            control = EntityControl<ReceiptPrintHistory>.CreateEntityControl("ORMapping");
        }

        public Int32 AddReceiptPrintHistory(ReceiptPrintHistory receiptprinthistory)
        {
            return Convert.ToInt32(control.AddEntity(receiptprinthistory));
        }

        public IList<ReceiptPrintHistory> GetAllReceiptPrintHistory(string strHQL, System.Collections.Generic.List<HQLParameter> hp)
        {
            return control.GetEntities(strHQL, hp);
        }

        public void UpdateReceiptPrintHistory(ReceiptPrintHistory receiptprinthistory)
        {
            control.UpdateEntity(receiptprinthistory, receiptprinthistory.ReceiptID);
        }
    }
}
